home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d8 / scripts.arc / CAPTURE.SLT < prev    next >
Text File  |  1988-11-06  |  2KB  |  58 lines

  1. /////////////////////////////////////////////////////////////////////////
  2. //          CAPTURE.SLT  -  by Terry Robertson (October 1988)          //
  3. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
  4. //                                                                     //
  5. //  This script automatically creates a capture file for each log-on   //
  6. //  and allocates a filename based on the name of the host system and  //
  7. //  the current date. This enables you to review your online activity  //
  8. //  knowing exactly what data belongs to which board and when.         //
  9. //  For the script to work properly you should make sure that the      //
  10. //  first FOUR characters of each name in your dialling directory are  //
  11. //  acceptable to DOS when contained in filenames, eg do NOT include   //
  12. //  spaces and such characters as "." and "\".                         //
  13. //  This script may be "called" from a log-on script or "attached" to  //
  14. //  a function key for automatic execution.                            //
  15. //                                                                     //
  16. /////////////////////////////////////////////////////////////////////////
  17.  
  18.  
  19.  
  20.  
  21.  
  22. str cappath[64];                   //
  23. str capext[]=".cap";               // extension ".cap"
  24. str capname[8];                    // 8 character filename
  25. str dt[8];                         // the date variable
  26.  
  27. str s[64];
  28. str n[50];
  29.  
  30.  
  31.  
  32. main()
  33.  
  34. {                                                                                                         //                                     \/
  35. capture("*CLOSE*");                // if open, close old capture file
  36.  
  37.  
  38. s = (_capture_fname);              // get NORMAL capture file name
  39. fnstrip(s, 12, n);                 // strip filename; retain path
  40.  
  41.  
  42. cappath = (n);                     // set capture file PATH
  43.  
  44.  
  45. substr(_entry_name,0,4,capname);  // set file name to first 4 chars of
  46.                                   //    dialing directory name
  47.  
  48. date(curtime(), dt);              // get system date
  49. delchrs(dt, 5, 3);                // and strip non essential chars
  50. delchrs(dt, 2, 1);                // to reduce to 4 char shortform date
  51.  
  52. strcat(capname,dt);               // adds shortform date to filename
  53. strcat(cappath,capname);          // adds the name to the path
  54. strcat(cappath,capext);           // adds the file ext.
  55. capture(cappath);                 // opens new capture file
  56.  
  57. }
  58.